package com.chen.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

@Controller
public class RestFulController {
//RestFul 风格
    @GetMapping("/add/{a}/{b}")
    public String add(@PathVariable("a") Integer a,
                      @PathVariable("b") Integer b,
                      Model model) {
        int c = a + b;
        System.out.println(c);
        model.addAttribute("msg", c);
        return "test";
    }
}
